package org.spring.springcar.component;

import org.spring.springcar.model.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class UserComponent {
    public void hello(){
        System.out.println("hello UserComponent.....");
    }

    @Bean
    public UserInfo userInfo(){
        return new UserInfo("zhangsan",12);
    }
    @Bean
    public UserInfo userInfo2(){
        return new UserInfo("lisi",19);
    }
}
